import request from '@/utils/https'
// import qs from 'qs'

export function pageList (data) {
  return request({
    url: '/cateringCompany/pageList',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}

export function num (data) {
  // const params = qs.stringify(data)
  return request({
    url: '/cateringCompany/num',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}

export function areaDict (params) {
  return request({
    url: '/dictionary/areaDict',
    method: 'GET',
    headers: {
      'Content-Type': 'application/json'
    },
    params
  })
}

export function equipmentInfoNum (data) {
  // const params = qs.stringify(data)
  return request({
    url: '/equipmentInfo/num',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}

export function equipmentPageList (data) {
  return request({
    url: '/equipmentInfo/pageList',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}

export function cleaningRecordData (data) {
  return request({
    url: '/cleaningRecord/cleaningRecordData',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}

// 报警统计分析
export function warnStatistics (data) {
  return request({
    url: '/equipmentInfo/warnStatistics',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}

// 临期清洗提醒
export function cleaningRecordWarn (data) {
  return request({
    url: '/cleaningRecord/cleaningRecordWarn',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}

// 超期未清洗报警
export function noCleaningRecordOver (data) {
  return request({
    url: '/cleaningRecord/noCleaningRecordOver',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}
// 违规报警记录
export function warnPageList (data) {
  return request({
    url: '/equipmentInfo/warnPageList',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}

export function restaurantSprinkle (data) {
  return request({
    url: '/cateringCompany/restaurantSprinkle',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}

// 查看企业详情
export function companyDetail (params) {
  return request({
    url: '/cateringCompany/detail',
    method: 'GET',
    headers: {
      'Content-Type': 'application/json'
    },
    params
  })
}

// 正常清洗记录 & 超期清洗记录
export function cleaningRecord (data) {
  return request({
    url: '/cleaningRecord/cleaningRecord',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}

// 折线图
// export function realTimeData (data) {
//   return request({
//     url: '/equipmentInfo/realTimeDataNew',
//     method: 'post',
//     headers: {
//       'Content-Type': 'application/x-www-form-urlencoded'
//     },
//     data
//   })
// }

export function realTimeDataRecord (data) {
  return request({
    url: '/equipmentInfo/realTimeData',
    method: 'post',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  })
}

export function list (params) {
  return request({
    url: '/dictionary/list',
    method: 'GET',
    headers: {
      'Content-Type': 'application/json'
    },
    params
  })
}

export function smokeAlarmPageList (params) {
  return request({
    url: '/equipmentInfo/smokeAlarmPageList',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data:params
  })
}
export function fiveMinutesGasConcentration (params) {
  return request({
    url: '/equipmentInfo/fiveMinutesGasConcentration',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data:params
  })
}

export function twoHoursGasConcentration (params) {
  return request({
    url: '/equipmentInfo/twoHoursGasConcentration',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data:params
  })
}

export function workingGasConcentration (params) {
  return request({
    url: '/equipmentInfo/workingGasConcentration',
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data:params
  })
}